/*
 * LoadMapRequestHandler.java
 * Copyright 2012 Erik Strelzoff
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.magelord.servlet;

import java.util.Map;

public class LoadMapRequestHandler extends RequestHandler {
	
	/** Creates a new instance of LoadMapRequestHandler */
	public LoadMapRequestHandler(MageLordServletContext context) {
		super(context);
	}
	
	public Object handleRequest(Map<String, String[]> parameterMap) {
//		String[] ids = parameterMap.get("id");
//		if (ids == null || ids.length == 0) {
//			return m_context.makeJSONError("LoadMapRequestHandler: 'id' parameter not specified");
//		}
//		try {
//			JSONObject jobj = new JSONObject();
//			JSONArray array = new JSONArray("[[\"forest\",\"forest\",\"mountain\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"desert\",\"forest\",\"forest\",\"desert\",\"forest\",\"forest\",\"forest\"],[\"forest\",\"forest\",\"mountain\",\"water\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"water\"],[\"mountain\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"desert\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"desert\",\"forest\",\"desert\",\"forest\",\"forest\"],[\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"mountain\",\"forest\",\"desert\",\"water\",\"mountain\",\"forest\",\"water\",\"water\",\"forest\",\"water\"],[\"forest\",\"forest\",\"forest\",\"mountain\",\"forest\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\"],[\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"water\",\"water\",\"forest\",\"forest\",\"forest\",\"mountain\",\"forest\",\"water\",\"forest\",\"forest\",\"mountain\",\"forest\",\"forest\"],[\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"desert\",\"forest\",\"forest\",\"forest\"],[\"forest\",\"forest\",\"forest\",\"mountain\",\"forest\",\"forest\",\"forest\",\"forest\",\"water\",\"mountain\",\"forest\",\"forest\",\"mountain\",\"water\",\"water\",\"forest\",\"forest\",\"forest\"],[\"water\",\"forest\",\"forest\",\"mountain\",\"forest\",\"forest\",\"forest\",\"desert\",\"mountain\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\"],[\"mountain\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"water\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"desert\"],[\"forest\",\"forest\",\"mountain\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"mountain\",\"forest\",\"mountain\",\"forest\",\"forest\",\"desert\",\"forest\",\"water\",\"forest\"],[\"desert\",\"water\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"desert\",\"forest\",\"forest\",\"water\",\"desert\",\"forest\",\"forest\",\"water\",\"water\"],[\"forest\",\"forest\",\"water\",\"water\",\"forest\",\"forest\",\"forest\",\"desert\",\"forest\",\"desert\",\"water\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"water\",\"water\"],[\"mountain\",\"forest\",\"forest\",\"forest\",\"forest\",\"mountain\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"desert\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\"],[\"forest\",\"forest\",\"forest\",\"forest\",\"desert\",\"mountain\",\"forest\",\"mountain\",\"forest\",\"mountain\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\"],[\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"water\",\"mountain\"],[\"forest\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"water\",\"forest\",\"forest\",\"mountain\",\"forest\"],[\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"desert\",\"water\",\"water\",\"forest\",\"water\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\"],[\"water\",\"forest\",\"forest\",\"forest\",\"mountain\",\"forest\",\"forest\",\"forest\",\"mountain\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\"],[\"desert\",\"desert\",\"water\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"water\",\"water\",\"forest\",\"forest\",\"forest\",\"forest\",\"mountain\",\"forest\",\"water\"],[\"mountain\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"desert\",\"forest\",\"forest\",\"forest\",\"mountain\",\"forest\",\"water\",\"forest\"],[\"forest\",\"forest\",\"water\",\"forest\",\"water\",\"water\",\"water\",\"forest\",\"forest\",\"forest\",\"desert\",\"forest\",\"forest\",\"water\",\"desert\",\"forest\",\"forest\",\"water\"],[\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"mountain\",\"forest\",\"forest\",\"forest\",\"forest\",\"desert\",\"water\",\"forest\"],[\"desert\",\"water\",\"forest\",\"forest\",\"mountain\",\"water\",\"forest\",\"forest\",\"water\",\"forest\",\"forest\",\"forest\",\"water\",\"forest\",\"mountain\",\"water\",\"forest\",\"mountain\"]]");
//
//			jobj.put("hexmap", array);
//			return jobj;
//		} catch (JSONException e) {
//			m_context.log("LoadMapRequestHandler JSONException", e);
//			return m_context.makeJSONError("LoadMapRequestHandler: JSONException creating map");
//		}
		// TBI:  
		// Move to game logic layer.
		// Adjust to return a data model Map object.
		return null;
	}
	
	public String toString() {
		return "LoadMapRequestHandler";
	}
}
